import {
    createBrowserRouter,
} from "react-router-dom";
import ContextDemo from './../view/ContextDemo'
import ClassContextDemo from '../view/ClassContext'
import ThemeToggleDemo from '../view/ThemeToggleDemo'
import ThemeToggleButtonDemo from '../view/ThemeToggleButtonDemo'
import MultipleContextDemo from '../view/ MultipleContextDemo'
//import ErrorBoundary from '../view/ErrorBoundary'
import TestDemo from '../view/TestDemo'
import Refs from '../view/Refs'
import HocLogPropsDemo from '../view/HocLogProps'
import Hoc from '../view/Hoc'
import HocAi from '../view/HocAi'
import IntegratingWithOtherLibraries from '../view/IntegratingWithOtherLibraries'
import JSX from '../view/JSX'
import OptimizingPerformance from '../view/OptimizingPerformance'
import Portals from '../view/Portals'
import Portals1 from '../view/Portals1'
import Profiler from '../view/Profiler'
import NoES6 from '../view/NoES6'
import NoJsx from "../view/NoJsx"
import Coordinate from "../view/Coordinate"
import RefsDom from "../view/RefsDom";
import RenderProps from "../view/RenderProps";
import TestUseCallback from "../view/TestUseCallback";
import StaticTypeCheck from "../view/StaticTypeCheck";
import UncontrolledComponents from "../view/UncontrolledComponents";

const router = createBrowserRouter([
    {
      path: "/",
      element: <div>Hello world!</div>,
    },
    {
      path: '/context',
      element: <ContextDemo />
    },
    {
      path: '/context1',
      element: <ClassContextDemo />
    },
    {
      path: '/context-toggle',
      element: <ThemeToggleDemo />
    },
    {
      path: '/context-toggle-button',
      element: <ThemeToggleButtonDemo />
    },
    {
      path: '/multiple-context',
      element: <MultipleContextDemo signedInUser='signedInUser' theme='theme'/>
    },
    // {
    //   path: '/error-boundary',
    //   element: <ErrorBoundary />
    // },
    {
      path: '/test-demo',
      element: <TestDemo />
    },
    {
      path: '/refs',
      element: <Refs />
    },
    {
      path: '/hoc-log-props',
      element: <HocLogPropsDemo />
    },
    {
      path: '/hoc',
      element: <Hoc />
    },
    {
      path: '/hoc-ai',
      element: <HocAi />
    },
    {
      path: '/integrating-with-other-libraries',
      element: <IntegratingWithOtherLibraries />
    },
    {
      path: '/jsx',
      element: <JSX />
    },
    {
      path: '/optimizing-performance',
      element: <OptimizingPerformance />
    },
    {
      path: '/portals',
      element: <Portals />
    },
    {
      path: '/portals1',
      element: <Portals1 />
    },
    {
      path: '/profiler',
      element: <Profiler />
    },
    {
      path: '/no-es6',
      element: <NoES6 />
    },
    {
      path: '/no-jsx',
      element: <NoJsx/>
    },
    {
      path: '/coordinate',
      element: <Coordinate />
    },
    {
      path: '/refs-dom',
      element: <RefsDom />
    },
    {
      path: '/render-props',
      element: <RenderProps />
    },
    {
      path: '/test-use-callback',
      element: <TestUseCallback />
    },
    {
      path: '/static-type-check',
      element: <StaticTypeCheck />
    },
    {
      path: '/uncontrolled-components',
      element: <UncontrolledComponents />
    }
]);

export default router;



